package cn.bluemobi.app.controller.brochure;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.bluemobi.app.core.controller.AppBaseController;
import cn.bluemobi.app.entity.output.Brochure;
import cn.bluemobi.app.service.BrochureService;
import cn.bluemobi.common.core.dto.Dto;

import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.wordnik.swagger.annotations.ApiParam;

/**
 * 
 * @author lvxh
 * 
 */
@Controller
@RequestMapping("/brochure")
@Api(description = "单页说明", value = "brochure")
public class BrochureController extends AppBaseController {

	@Autowired
	private BrochureService brochureService;

	@ApiOperation(value = "获取单页", httpMethod = "POST")
	@RequestMapping("/getBrochure")
	@ResponseBody
	public Dto<Brochure> getBrochure(
			@ApiParam(value = "用户协议,关于我们", allowableValues = "userAgreement,aboutUs") @RequestParam("type") String type) {
		return brochureService.getBrochure(type);
	}
}
